﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;

namespace T8task2
{
    class DBHelper
    {
        public static string constr = "server=.;database=Games;Integrated Security=true";
        DataTable dt = new DataTable();
        public DataTable SelectByAdapter(string sql)
        {
            SqlConnection conn = new SqlConnection(constr);

            SqlDataAdapter da = new SqlDataAdapter(sql,conn);

            conn.Open();

            da.Fill(dt);

            return dt;
        }

    }
}
